public class Date {
    public int year = 100;
    public int month = 2;
    public int day = 3;


    //无参构造方法
   /* public Date() {
        *//*this.year = 100;
        this.month = 20;
        this.day = 2;*//*

        //必须是构造方法中第一条语句
        this(1900,2,3);

    }*/

    //带有三个参数的构造方法S
    public Date(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;

    }



    public void printDate(){
        System.out.println(year+"/"+month+"/"+day);
    }

    public static void main(String[] args) {
        Date d1 = new Date(2020,3,4);
        Date d2 = new Date(2029,6,9);
        Date d3 = new Date(2031,5,6);


        d1.printDate();
        d2.printDate();
        d3.printDate();

    }

    /*public static void main1(String[] args) {
        int a;
        System.out.println(a);
    }*/
}
